-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: resample.agg with read-only data #32758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pandas/core/series.py
Outdated
# check for is_list_like/slice instead of is_scalar to allow non-standard | ||
# scalars through, e.g. cftime.datetime needed by xarray | ||
# https://github.com/pydata/xarray/issues/3751 | ||
key_is_scalar = not is_list_like(key) and not isinstance(key, slice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sneaked in from a different issue / pr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it, will revert, thanks
@cython.wraparound(False) | ||
@cython.boundscheck(False) | ||
def group_last(rank_t[:, :] out, | ||
int64_t[:] counts, | ||
rank_t[:, :] values, | ||
ndarray[rank_t, ndim=2] values, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this limitation really apply to any place where we are using memoryviews? Or just isolated to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my understanding is that it applies to memoryviews with fused types
thanks @jbrockmendel |
Just a heads up I think this introduced some new build warnings. I've had a separate PR to clean those up and error going forward so can fall back to that if required, but if you have time to look in the interim would be appreciated as well Here is what I see pandas/_libs/groupby.c:37458:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:38233:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:39008:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:39781:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:40563:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:41999:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:42820:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:43641:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:44460:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:45288:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/hashtable.c:63216:20: warning: unused function '__pyx_memview_get_object' [-Wunused-function]
static PyObject *__pyx_memview_get_object(const char *itemp) {
^
pandas/_libs/hashtable.c:63221:12: warning: unused function '__pyx_memview_set_object' [-Wunused-function]
static int __pyx_memview_set_object(const char *itemp, PyObject *obj) {
^
pandas/_libs/groupby.c:55168:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:55970:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:56772:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:57568:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:58985:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:59784:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:60583:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~
pandas/_libs/groupby.c:61376:30: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and
'size_t' (aka 'unsigned long') [-Wsign-compare]
__pyx_t_3 = ((!((__pyx_t_2 == __pyx_t_1) != 0)) != 0);
~~~~~~~~~ ^ ~~~~~~~~~ |
Co-authored-by: jbrockmendel <[email protected]>
@WillAyd where does this sit on the annoyance-problem scale? i.e. is waiting for cython 0.30 a viable option? |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff